package com.neusoft.entity;

import com.neusoft.annotation.ID;
import com.neusoft.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Table("stu.rent")
@Data
@ToString
@Accessors(chain = true)  //链式写法
@NoArgsConstructor
@AllArgsConstructor
public class Rent {
    @ID
    private Integer id;
    private Integer houseid;
    private String name;
    private Integer amount;
    private String address;
    private String state;
    private String identity;
    private String phone;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date rentdate;
    private String remark;

    public Rent() {
    }

    public Rent(Integer id, String name, Integer amount, String address, String state, String identity, String phone, Integer houseid, Date rentdate,String remark) {
        this.id = id;
        this.name = name;
        this.amount = amount;
        this.address = address;
        this.state = state;
        this.identity = identity;
        this.phone = phone;
        this.houseid = houseid;
        this.rentdate = rentdate;
        this.remark = remark;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getHouseid() {
        return houseid;
    }

    public void setHouseid(Integer houseid) {
        this.houseid = houseid;
    }

    public Date getRentdate() {
        return rentdate;
    }

    public void setRentdate(Date rentdate) {
        this.rentdate = rentdate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "Rent{" +
                "id=" + id +
                ", houseid=" + houseid +
                ", name='" + name + '\'' +
                ", amount=" + amount +
                ", address='" + address + '\'' +
                ", state='" + state + '\'' +
                ", identity='" + identity + '\'' +
                ", phone='" + phone + '\'' +
                ", rentdate=" + rentdate +
                ", remark=" + remark +
                '}';
    }
}
